All Questions
Tagged with python-3.xunit-testing
4 questions
-3votes
1answer
2kviews
Test to check that executing a function does not raise an exception
I have the following function: def create_dic(): key_list = ['a','b'] val_list = [1, 2] dic = {} for i in range(2): dic[key_list[i]] = val_list[i] return dic I ...
2votes
2answers
2kviews
What is the difference between unit testing and handling exceptions
I have spent two full days now trying to understand the difference between unit testing and handling exception, but I can't get it. Things I have understood (or I think I have): Unit testing tests ...
2votes
3answers
335views
Should I test the debug branch of my code in a unit test?
Lets say I have a function that gets a list of what files to send that are later send over a socket to some other pc. Now usually I keep track of what files have been sent and don't send these files ...
1vote
1answer
875views
Suggestions for best design pattern for unittesting Excel readin in Pandas
When I read about unittests I keep reading that I shouldn't rely on external resources, but in some cases I would like to test reading in Excel files so I can be confident this portion of my code is ...